#include <ctime>
#include <unistd.h>
#include <iostream>
#include "threadPool.hpp"

using namespace std;

int main()
{
    srand((unsigned int)time(nullptr));
    threadPool<int>::getInstance()->start();
    sleep(3);
    while(true)
    {
        int task = rand() % 10 + 1;
        threadPool<int>::getInstance()->push(task);
        cout << "push a task, " << task << endl;
        sleep(1);
    }
    return 0;
}